{% extends "base.html" %}
{# Page d'inscription #}

{% block title %}{% endblock %}

{% block content %}
	{% if player!=NULL %}
    
    <div id="profile_tabs">
		<ul style="height: 39px;">
			<li><a href="#player-profile">Profile</a></li>
			<li><a href="#player-records">Records</a></li>
		</ul>
		<div id="player-profile">
			<div class="profile-options">
			    {% if isOwnerProfil %}
			    	<a href="profile_edit.php">Edit</a>
			        <a href="profile_delete.php">Delete</a>
			    {% else %}
					{% if isAdmin %}
						<a href="adm_players.php?pid={{player.getId()}}">Moderate</a>
					{% endif %}
			    {% endif %}
			</div>
			<div class="legend"> Nickname :</div>
			<div class="item w70p">{{player.nickname}}</div><br/>
		
		    <div class="legend">E-mail :</div>
		    <div class="item">{{player.displayed_email}}</div><br/>
			
		    <div class="legend">[DEBUG]State :</div>
		    <div class="item">{{player.state}}</div><br/>
			
		    <div class="legend">Birthdate :</div>
		    <div class="item">{{player.birthdate}}</div><br/>
		    
			<div class="legend">Country :</div>
		    <div class="item">{{player.getCountry().getFlagHtml()|raw}} <a href="total_times.php?penta=1&country={{player.getCountry().getId()}}">{{player.getCountry().name}}</a></div><br/>
		
			<div class="legend">Description :</div>
			<div class="item">{{player.description }}</div><br/>
		</div>
    
		<div id="player-records">
	        <form id="records-options" action="" method="GET">
		    	<input type="hidden" name="pid" value="{{profilId}}" />
		        <label class="label-left">Type
					<select name="type" onchange="submit()">        		
						{% for type in types %}
							{%if type.id == typeSelected %}                
								<option selected="selected" value="{{type.id}}">{{type.name}}</option>
							{% else %}
								<option value="{{type.id}}">{{type.name}}</option>
							{% endif %}
						{% endfor %}
					</select>
				</label>
		        <label class="label-left">Mode
					<select name="mode" onchange="submit()">
						{% for mode in modes %}
							{%if mode.id == modeSelected %}
								<option selected="selected" value="{{mode.id}}">{{mode.mode}}</option>
							{% else %}
								<option value="{{mode.id}}">{{mode.mode}}</option>
							{% endif %}
						{% endfor %}
					</select>
				</label>
		        <label class="label-left">Penta
					<input type="hidden" name="penta" value="off"/>
					<input type="checkbox" name="penta" value="on" {%if pentaSelected == 'on' %}checked="true"{% endif %} onchange="submit()" />
				</label>
		    </form>
			{% include 'displayRecords.inc.html' %}<br/><br/>
		</div>
	</div>

	<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="{{url}}" show_faces="true" width="450"></fb:like>
    <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=185294718167101&amp;xfbml=1"></script><fb:comments href="{{url}}" num_posts="3" width="500"></fb:comments>
    {% endif %}


{% endblock content %}